﻿using DXApplicationTangche.DTO;
using DXApplicationTangche.UC.标签打印.Service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DXApplicationTangche.UC.标签打印.model
{
    public class 标签打印Model
    {
        public List<DTO套号吊牌尺寸> DTO套号吊牌s { get; set; } = new List<DTO套号吊牌尺寸>();
        private List<MeasureItemDTO> measureItemDTOS = new List<MeasureItemDTO>();
        /// <summary>
        /// 打印是给打印页面的成衣值赋值
        /// </summary>
        /// <param name="measureItemDTOS"></param>
        /// <returns></returns>
        public 标签打印Model buildDTO套号吊牌s(List<MeasureItemDTO> measureItemDTOS)
        {
            this.measureItemDTOS = measureItemDTOS;
            foreach (MeasureItemDTO dTO in this.measureItemDTOS)
            {
                switch (dTO.itemNameCn)
                {
                    case "胸围":
                        this.DTO套号吊牌s.Add(new DTO套号吊牌尺寸("bust", dTO.garmentSize.ToString()));
                        break;
                    case "肩宽":
                        this.DTO套号吊牌s.Add(new DTO套号吊牌尺寸("shoulderWidth", dTO.garmentSize.ToString()));
                        break;
                    case "衣长":
                        this.DTO套号吊牌s.Add(new DTO套号吊牌尺寸("clothesLength", dTO.garmentSize.ToString()));
                        break;
                    case "袖长":
                        this.DTO套号吊牌s.Add(new DTO套号吊牌尺寸("sleeveLength", dTO.garmentSize.ToString()));
                        break;
                    case "摆围":
                        this.DTO套号吊牌s.Add(new DTO套号吊牌尺寸("swingAround", dTO.garmentSize.ToString()));
                        break;
                    case "袖口":
                        this.DTO套号吊牌s.Add(new DTO套号吊牌尺寸("cuff", dTO.garmentSize.ToString()));
                        break;
                    case "袖口围":
                        this.DTO套号吊牌s.Add(new DTO套号吊牌尺寸("cuff", dTO.garmentSize.ToString()));
                        break;
                    case "袖肥":
                        this.DTO套号吊牌s.Add(new DTO套号吊牌尺寸("sleeveFertilizer", dTO.garmentSize.ToString()));
                        break;
                    case "腰围":
                        this.DTO套号吊牌s.Add(new DTO套号吊牌尺寸("waist", dTO.garmentSize.ToString()));
                        break;
                    case "裤腰围":
                        this.DTO套号吊牌s.Add(new DTO套号吊牌尺寸("waist", dTO.garmentSize.ToString()));
                        break;
                    case "裙长":
                        this.DTO套号吊牌s.Add(new DTO套号吊牌尺寸("skirtLength", dTO.garmentSize.ToString()));
                        break;
                    case "臀围":
                        this.DTO套号吊牌s.Add(new DTO套号吊牌尺寸("hipline", dTO.garmentSize.ToString()));
                        break;
                    case "裤长":
                        this.DTO套号吊牌s.Add(new DTO套号吊牌尺寸("trousersLength", dTO.garmentSize.ToString()));
                        break;
                    case "大腿围":
                        this.DTO套号吊牌s.Add(new DTO套号吊牌尺寸("thighCircumference", dTO.garmentSize.ToString()));
                        break;
                    case "膝围":
                        this.DTO套号吊牌s.Add(new DTO套号吊牌尺寸("kneeCircumference", dTO.garmentSize.ToString()));
                        break;
                    case "裤口围":
                        this.DTO套号吊牌s.Add(new DTO套号吊牌尺寸("trousersGirth", dTO.garmentSize.ToString()));
                        break;
                    case "裤内长":
                        this.DTO套号吊牌s.Add(new DTO套号吊牌尺寸("inseam", dTO.garmentSize.ToString()));
                        break;
                    default:
                        break;
                }
            }
            return this;
        }
    }
    
}
